/* 地图组件样式 */
.map-container {
  width: 100%;
  height: 100%;
  padding: 0;
}

.main-card {
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  overflow: hidden;
}

.usage-tip {
  border-radius: 10px;
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border: 1px solid #91d5ff;
}

.tip-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #1890ff;
  margin-top: 4px;
}

.map-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map {
  width: 100%;
  height: 450px;
  border: none;
  transition: all 0.3s ease;
}

.map:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.map-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  pointer-events: none;
}

.coordinate-display {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(82, 196, 26, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 600;
}

.control-panel {
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
}

.operation-card, .info-card {
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.operation-card:hover, .info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.location-btn {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  transition: all 0.3s ease;
  font-weight: 600;
}

.location-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(24, 144, 255, 0.5);
}

.search-section {
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #f6ffed 0%, #f0f9ff 100%);
  border: 1px solid #d9f7be;
}

.search-input {
  border-radius: 8px;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-details {
  background: #fafafa;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #262626;
}

.confirm-section {
  margin-top: 8px;
}

.confirm-btn {
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
  transition: all 0.3s ease;
  font-weight: 600;
}

.confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(82, 196, 26, 0.5);
}

.empty-location {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: 8px;
  border: 2px dashed #d9d9d9;
}

.empty-tips {
  text-align: center;
}

.empty-tips p {
  margin: 8px 0 4px 0;
  color: #8c8c8c;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .map {
    height: 350px;
  }
  
  .tip-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .coordinate-display {
    font-size: 12px;
    top: 12px;
    right: 12px;
  }
  
  .map-overlay {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 640px) {
  .map {
    height: 300px;
  }
  
  .location-details {
    padding: 12px;
  }
  
  .search-section {
    padding: 12px;
  }
}

/* 确保地图容器有明确的尺寸 */
#amap-container {
  position: relative;
  background: linear-gradient(135deg, #f0f2f5 0%, #e6f7ff 100%);
  border-radius: 12px;
}

/* 高德地图控件样式调整 */
:deep(.amap-logo) {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

:deep(.amap-copyright) {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

:deep(.amap-logo:hover),
:deep(.amap-copyright:hover) {
  opacity: 1;
}

/* 标记点样式 */
:deep(.amap-marker) {
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

:deep(.amap-marker:hover) {
  transform: scale(1.15);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

/* 信息窗体样式 */
:deep(.amap-info-window) {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid #e8e8e8;
  overflow: hidden;
}

:deep(.amap-info-window .amap-info-content) {
  border-radius: 12px;
}

/* 按钮悬停效果 */
:deep(.n-button) {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:deep(.n-button:hover) {
  transform: translateY(-1px);
}

/* 卡片悬停效果 */
:deep(.n-card) {
  transition: all 0.3s ease;
}

/* 网格间距优化 */
:deep(.n-grid-item) {
  transition: all 0.3s ease;
}

/* 描述列表美化 */
:deep(.n-descriptions-item-label) {
  font-weight: 600;
  color: #262626;
}

:deep(.n-descriptions-item-content) {
  color: #595959;
}

/* 标签美化 */
:deep(.n-tag) {
  border-radius: 6px;
  font-weight: 500;
}

/* 输入框美化 */
:deep(.n-input) {
  border-radius: 8px;
  transition: all 0.3s ease;
}

:deep(.n-input:hover) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 空状态美化 */
:deep(.n-empty) {
  padding: 24px;
}

/* 加载状态美化 */
:deep(.n-button.n-button--loading) {
  background: linear-gradient(135deg, #91d5ff 0%, #69c0ff 100%);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-container {
  animation: fadeInUp 0.6s ease;
}

.operation-card,
.info-card {
  animation: fadeInUp 0.6s ease 0.1s both;
}

/* 简化的模态框样式 */
.modal-layout .map {
  height: 340px !important;
}

.modal-layout .control-panel {
  max-height: 200px;
  overflow-y: auto;
}

/* 响应式调整 */
@media (max-height: 800px) {
  .modal-layout .map {
    height: 280px !important;
  }
}

@media (max-height: 600px) {
  .modal-layout .map {
    height: 220px !important;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #d9d9d9 0%, #bfbfbf 100%);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #bfbfbf 0%, #a6a6a6 100%);
}
